#!/usr/bin/env bash

# Call PR GitHub API and parse it to get the base branch

set -o pipefail
set -eu

curl -H "Authorization: token $GITHUB_API_TOKEN" "https://api.github.com/repos/$PROJECT_SLUG/pulls/$PULL_REQUEST_NUMBER" | jq '.base.ref'